Optimal. Leaf size=202 \[ -\frac {(a-b x) \sqrt {a^2+2 a b x+b^2 x^2} \sqrt {c+e x+d x^2}}{x (a+b x)}+\frac {(2 a d+b e) \sqrt {a^2+2 a b x+b^2 x^2} \tanh ^{-1}\left (\frac {e+2 d x}{2 \sqrt {d} \sqrt {c+e x+d x^2}}\right )}{2 \sqrt {d} (a+b x)}-\frac {(2 b c+a e) \sqrt {a^2+2 a b x+b^2 x^2} \tanh ^{-1}\left (\frac {2 c+e x}{2 \sqrt {c} \sqrt {c+e x+d x^2}}\right )}{2 \sqrt {c} (a+b x)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 202, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 38, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {1014, 826, 857,
635, 212, 738} \begin {gather*} -\frac {\sqrt {a^2+2 a b x+b^2 x^2} (a-b x) \sqrt {c+d x^2+e x}}{x (a+b x)}+\frac {\sqrt {a^2+2 a b x+b^2 x^2} (2 a d+b e) \tanh ^{-1}\left (\frac {2 d x+e}{2 \sqrt {d} \sqrt {c+d x^2+e x}}\right )}{2 \sqrt {d} (a+b x)}-\frac {\sqrt {a^2+2 a b x+b^2 x^2} (a e+2 b c) \tanh ^{-1}\left (\frac {2 c+e x}{2 \sqrt {c} \sqrt {c+d x^2+e x}}\right )}{2 \sqrt {c} (a+b x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 635
Rule 738
Rule 826
Rule 857
Rule 1014
Rubi steps
\begin {align*} \int \frac {\sqrt {a^2+2 a b x+b^2 x^2} \sqrt {c+e x+d x^2}}{x^2} \, dx &=\frac {\sqrt {a^2+2 a b x+b^2 x^2} \int \frac {\left (2 a b+2 b^2 x\right ) \sqrt {c+e x+d x^2}}{x^2} \, dx}{2 a b+2 b^2 x}\\ &=-\frac {(a-b x) \sqrt {a^2+2 a b x+b^2 x^2} \sqrt {c+e x+d x^2}}{x (a+b x)}-\frac {\sqrt {a^2+2 a b x+b^2 x^2} \int \frac {-2 b (2 b c+a e)-2 b (2 a d+b e) x}{x \sqrt {c+e x+d x^2}} \, dx}{2 \left (2 a b+2 b^2 x\right )}\\ &=-\frac {(a-b x) \sqrt {a^2+2 a b x+b^2 x^2} \sqrt {c+e x+d x^2}}{x (a+b x)}+\frac {\left (b (2 b c+a e) \sqrt {a^2+2 a b x+b^2 x^2}\right ) \int \frac {1}{x \sqrt {c+e x+d x^2}} \, dx}{2 a b+2 b^2 x}+\frac {\left (b (2 a d+b e) \sqrt {a^2+2 a b x+b^2 x^2}\right ) \int \frac {1}{\sqrt {c+e x+d x^2}} \, dx}{2 a b+2 b^2 x}\\ &=-\frac {(a-b x) \sqrt {a^2+2 a b x+b^2 x^2} \sqrt {c+e x+d x^2}}{x (a+b x)}-\frac {\left (2 b (2 b c+a e) \sqrt {a^2+2 a b x+b^2 x^2}\right ) \text {Subst}\left (\int \frac {1}{4 c-x^2} \, dx,x,\frac {2 c+e x}{\sqrt {c+e x+d x^2}}\right )}{2 a b+2 b^2 x}+\frac {\left (2 b (2 a d+b e) \sqrt {a^2+2 a b x+b^2 x^2}\right ) \text {Subst}\left (\int \frac {1}{4 d-x^2} \, dx,x,\frac {e+2 d x}{\sqrt {c+e x+d x^2}}\right )}{2 a b+2 b^2 x}\\ &=-\frac {(a-b x) \sqrt {a^2+2 a b x+b^2 x^2} \sqrt {c+e x+d x^2}}{x (a+b x)}+\frac {(2 a d+b e) \sqrt {a^2+2 a b x+b^2 x^2} \tanh ^{-1}\left (\frac {e+2 d x}{2 \sqrt {d} \sqrt {c+e x+d x^2}}\right )}{2 \sqrt {d} (a+b x)}-\frac {(2 b c+a e) \sqrt {a^2+2 a b x+b^2 x^2} \tanh ^{-1}\left (\frac {2 c+e x}{2 \sqrt {c} \sqrt {c+e x+d x^2}}\right )}{2 \sqrt {c} (a+b x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.49, size = 151, normalized size = 0.75 \begin {gather*} -\frac {\sqrt {(a+b x)^2} \left (2 \sqrt {d} (2 b c+a e) x \tanh ^{-1}\left (\frac {-\sqrt {d} x+\sqrt {c+x (e+d x)}}{\sqrt {c}}\right )+\sqrt {c} \left (2 \sqrt {d} (a-b x) \sqrt {c+x (e+d x)}+(2 a d+b e) x \log \left (e+2 d x-2 \sqrt {d} \sqrt {c+x (e+d x)}\right )\right )\right )}{2 \sqrt {c} \sqrt {d} x (a+b x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.13, size = 249, normalized size = 1.23
method | result | size |
risch | \(-\frac {a \sqrt {d \,x^{2}+e x +c}\, \sqrt {\left (b x +a \right )^{2}}}{x \left (b x +a \right )}+\frac {\left (b \sqrt {d \,x^{2}+e x +c}+\frac {e b \ln \left (\frac {\frac {e}{2}+d x}{\sqrt {d}}+\sqrt {d \,x^{2}+e x +c}\right )}{2 \sqrt {d}}+a \sqrt {d}\, \ln \left (\frac {\frac {e}{2}+d x}{\sqrt {d}}+\sqrt {d \,x^{2}+e x +c}\right )-\frac {\ln \left (\frac {2 c +e x +2 \sqrt {c}\, \sqrt {d \,x^{2}+e x +c}}{x}\right ) a e}{2 \sqrt {c}}-\sqrt {c}\, \ln \left (\frac {2 c +e x +2 \sqrt {c}\, \sqrt {d \,x^{2}+e x +c}}{x}\right ) b \right ) \sqrt {\left (b x +a \right )^{2}}}{b x +a}\) | \(201\) |
default | \(-\frac {\mathrm {csgn}\left (b x +a \right ) \left (-2 \sqrt {d \,x^{2}+e x +c}\, d^{\frac {5}{2}} a \,x^{2}+2 d^{\frac {3}{2}} c^{\frac {3}{2}} \ln \left (\frac {2 c +e x +2 \sqrt {c}\, \sqrt {d \,x^{2}+e x +c}}{x}\right ) b x +d^{\frac {3}{2}} \sqrt {c}\, \ln \left (\frac {2 c +e x +2 \sqrt {c}\, \sqrt {d \,x^{2}+e x +c}}{x}\right ) a e x +2 \left (d \,x^{2}+e x +c \right )^{\frac {3}{2}} d^{\frac {3}{2}} a -2 \sqrt {d \,x^{2}+e x +c}\, d^{\frac {3}{2}} a e x -2 \sqrt {d \,x^{2}+e x +c}\, d^{\frac {3}{2}} b c x -2 \ln \left (\frac {2 \sqrt {d \,x^{2}+e x +c}\, \sqrt {d}+2 d x +e}{2 \sqrt {d}}\right ) a c \,d^{2} x -\ln \left (\frac {2 \sqrt {d \,x^{2}+e x +c}\, \sqrt {d}+2 d x +e}{2 \sqrt {d}}\right ) d b c e x \right )}{2 c x \,d^{\frac {3}{2}}}\) | \(249\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.58, size = 691, normalized size = 3.42 \begin {gather*} \left [\frac {{\left (2 \, a c d x + b c x e\right )} \sqrt {d} \log \left (8 \, d^{2} x^{2} + 8 \, d x e + 4 \, \sqrt {d x^{2} + x e + c} {\left (2 \, d x + e\right )} \sqrt {d} + 4 \, c d + e^{2}\right ) + {\left (2 \, b c d x + a d x e\right )} \sqrt {c} \log \left (\frac {4 \, c d x^{2} + x^{2} e^{2} + 8 \, c x e - 4 \, \sqrt {d x^{2} + x e + c} {\left (x e + 2 \, c\right )} \sqrt {c} + 8 \, c^{2}}{x^{2}}\right ) + 4 \, {\left (b c d x - a c d\right )} \sqrt {d x^{2} + x e + c}}{4 \, c d x}, -\frac {2 \, {\left (2 \, a c d x + b c x e\right )} \sqrt {-d} \arctan \left (\frac {\sqrt {d x^{2} + x e + c} {\left (2 \, d x + e\right )} \sqrt {-d}}{2 \, {\left (d^{2} x^{2} + d x e + c d\right )}}\right ) - {\left (2 \, b c d x + a d x e\right )} \sqrt {c} \log \left (\frac {4 \, c d x^{2} + x^{2} e^{2} + 8 \, c x e - 4 \, \sqrt {d x^{2} + x e + c} {\left (x e + 2 \, c\right )} \sqrt {c} + 8 \, c^{2}}{x^{2}}\right ) - 4 \, {\left (b c d x - a c d\right )} \sqrt {d x^{2} + x e + c}}{4 \, c d x}, \frac {2 \, {\left (2 \, b c d x + a d x e\right )} \sqrt {-c} \arctan \left (\frac {\sqrt {d x^{2} + x e + c} {\left (x e + 2 \, c\right )} \sqrt {-c}}{2 \, {\left (c d x^{2} + c x e + c^{2}\right )}}\right ) + {\left (2 \, a c d x + b c x e\right )} \sqrt {d} \log \left (8 \, d^{2} x^{2} + 8 \, d x e + 4 \, \sqrt {d x^{2} + x e + c} {\left (2 \, d x + e\right )} \sqrt {d} + 4 \, c d + e^{2}\right ) + 4 \, {\left (b c d x - a c d\right )} \sqrt {d x^{2} + x e + c}}{4 \, c d x}, \frac {{\left (2 \, b c d x + a d x e\right )} \sqrt {-c} \arctan \left (\frac {\sqrt {d x^{2} + x e + c} {\left (x e + 2 \, c\right )} \sqrt {-c}}{2 \, {\left (c d x^{2} + c x e + c^{2}\right )}}\right ) - {\left (2 \, a c d x + b c x e\right )} \sqrt {-d} \arctan \left (\frac {\sqrt {d x^{2} + x e + c} {\left (2 \, d x + e\right )} \sqrt {-d}}{2 \, {\left (d^{2} x^{2} + d x e + c d\right )}}\right ) + 2 \, {\left (b c d x - a c d\right )} \sqrt {d x^{2} + x e + c}}{2 \, c d x}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {c + d x^{2} + e x} \sqrt {\left (a + b x\right )^{2}}}{x^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\sqrt {{\left (a+b\,x\right )}^2}\,\sqrt {d\,x^2+e\,x+c}}{x^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________